﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.Json.Serialization;
using System.Threading.Tasks;
using VM.Entity.EntityMap.Goods;
using VM.Entity.EntityMap.User;

namespace VM.Entity.EntityMap.ShopCar
{
    public class sys_shopCar
    {
        public sys_shopCar()
        { }
        #region Model
        private int _id;
        private string _name;
        private int _goodid;
        private int _specid;
        private int _qty;
        private int _createuserid;
        private DateTime _createdate;
        private string _description;
        /// <summary>
        /// 
        /// </summary>
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true, IsOnlyIgnoreInsert = true)]
        [JsonIgnore]
        public int id
        {
            set { _id = value; }
            get { return _id; }
        }
        /// <summary>
        /// 
        /// </summary>
        [JsonIgnore]
        public string? name
        {
            set { _name = value; }
            get { return _name; }
        }
        /// <summary>
        /// 
        /// </summary>
        public int goodId
        {
            set { _goodid = value; }
            get { return _goodid; }
        }

        [Navigate(NavigateType.OneToOne, nameof(goodId))]
        [SugarColumn(IsOnlyIgnoreInsert = true)]
        [JsonIgnore]
        public good_mainInfo? good { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int specId
        {
            set { _specid = value; }
            get { return _specid; }
        }


        [Navigate(NavigateType.OneToOne, nameof(specId))]
        [SugarColumn(IsOnlyIgnoreInsert = true)]
        [JsonIgnore]
        public good_spec? spec { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int qty
        {
            set { _qty = value; }
            get { return _qty; }
        }
        /// <summary>
        /// 
        /// </summary>
        public int createUserId
        {
            set { _createuserid = value; }
            get { return _createuserid; }
        }

        [Navigate(NavigateType.OneToOne, nameof(createUserId))]
        [SugarColumn(IsOnlyIgnoreInsert = true)]
        [JsonIgnore]
        public sys_user? createUser { get; set; }
        /// <summary>
        /// 
        /// </summary>
        [JsonIgnore]
        public DateTime createDate
        {
            set { _createdate = value; }
            get { return _createdate; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string description
        {
            set { _description = value; }
            get { return _description; }
        }
        #endregion Model
    }
}
